#pragma once
#include "..\Common\Global.h"

class CLexer_Node
{
public:
	enum TYPE
	{
		ttSymbol,
		ttString,
		ttNumber,
		ttOperator,
		ttNote,
		ttSpace,
		ttEnter,
	};

	CLexer_Node() : exit(FALSE){}
	CLexer_Node(Lexer_Combinator_Node& _theCombinator_Node,BOOL _exit,TYPE _type) : theCombinator_Node(_theCombinator_Node),exit(_exit),type(_type){}

	inline Lexer_Combinator_Node TheCombinator_Node()
	{
		return theCombinator_Node;
	}

	inline BOOL Exit()
	{
		return exit;
	}

	inline TYPE Type()
	{
		return type;
	}
protected:
	Lexer_Combinator_Node theCombinator_Node;
	BOOL exit;
	TYPE type;
};

class CLexer
{
public:
	CLexer();
	~CLexer()
	{
		g_Lexer_MemoryManager.Destroy();
	}

	BOOL Parser(LPTSTR input);
	void Print();

	List<NAutoPtr<CLexer_Token>> LexerTokenList;
protected:
	List<NAutoPtr<CLexer_Node>> LexerNodeList;
};